Skip to content

add docs_rs_crates_io subcrate for interaction / shared types#3357

Open
syphar wants to merge 4 commits into
rust-lang:mainfrom
syphar:event-structs
Open

add docs_rs_crates_io subcrate for interaction / shared types#3357
syphar wants to merge 4 commits into
rust-lang:mainfrom
syphar:event-structs

Conversation

@syphar

@syphar syphar commented Jun 3, 2026

Copy link
Copy Markdown
Member

first use-case is the SQS link for index changes that will replace our git index usage

@syphar syphar self-assigned this Jun 3, 2026
@github-actions github-actions Bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Jun 3, 2026
Comment on lines +100 to +101
/// is the release yanked?
pub yanked: bool,

@LawnGnome LawnGnome Jun 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this required? I think this could be inferred in all cases except deletion, in which case I'm not sure it matters anyway for you.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid, I'll remove it.

pub yanked: bool,
/// The semantic version of the crate.
#[serde(rename = "vers")]
pub version: semver::Version,

@LawnGnome LawnGnome Jun 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the point we'd be generating these messages on crates.io, we've already validated the version number and only have it as a String, since that's what we use in the database models. Would you be OK changing this to String?

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's better for you, we can do it.

( docs.rs works with semver::Version everywhere, and converts it always when fetching from the DB).

@syphar syphar requested a review from LawnGnome July 1, 2026 12:49
@syphar syphar marked this pull request as ready for review July 1, 2026 14:49
@syphar syphar requested a review from a team as a code owner July 1, 2026 14:49
Comment thread crates/lib/docs_rs_crates_io/src/events.rs Outdated
Comment thread crates/lib/docs_rs_crates_io/Cargo.toml
@GuillaumeGomez

Copy link
Copy Markdown
Member

Btw, you created this crate but it's not used anywhere in our codebase for now. Shouldn't we plug it into our codebase in this PR directly?

@syphar

syphar commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Btw, you created this crate but it's not used anywhere in our codebase for now. Shouldn't we plug it into our codebase in this PR directly?

usage is WIP in #3349.

Idea is:

  • we release this crate
  • crates.io adds it, then starts publishing events using these structs
  • then we can start consuming the events.

@syphar syphar requested a review from GuillaumeGomez July 1, 2026 20:26
@syphar

syphar commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

( waiting for approval from @LawnGnome too before merging / releasing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants